﻿
<Window x:Class="DateTimePickerDemo.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:pickers="clr-namespace:PeteEvans.Pickers;assembly=DateTimePicker"
        Title="MainWindow" Height="400" Width="650">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>

        <pickers:DateTimePicker x:Name="DateTimePicker"
            Grid.Column="0" Grid.Row="0" Width="110"
            Format="0:dd/MM/yy HH:mm" SelectedValue="{Binding ElementName=TimePicker, Path=DisplayTime, Mode=TwoWay}" />

        <TextBlock Grid.Column="1" Grid.Row="0" Text="{Binding ElementName=DateTimePicker, Path=SelectedValue, Mode=OneWay, StringFormat=dd/MM/yy HH:mm}" Width="110" VerticalAlignment="Top"/>
        <TextBlock Grid.Column="2" Grid.Row="0" Text="{Binding ElementName=DateTimePicker, Path=InterimValue, Mode=OneWay, StringFormat=dd/MM/yy HH:mm}" Width="110" VerticalAlignment="Top"/>

        <pickers:DateTimePicker x:Name="DateTimePicker2"
            Grid.Column="0" Grid.Row="1" Width="110"
            Format="0:dd/MM/yy HH:mm" SelectedValue="{Binding ElementName=TimePicker, Path=DisplayTime, Mode=TwoWay}" />

        <TextBlock Grid.Column="1" Grid.Row="1" Text="{Binding ElementName=DateTimePicker2, Path=SelectedValue, Mode=OneWay, StringFormat=dd/MM/yy HH:mm}" Width="110" VerticalAlignment="Top"/>
        <TextBlock Grid.Column="2" Grid.Row="1" Text="{Binding ElementName=DateTimePicker2, Path=InterimValue, Mode=OneWay, StringFormat=dd/MM/yy HH:mm}" Width="110" VerticalAlignment="Top"/>

        <pickers:NullableDateTimePicker x:Name="DateTimePicker3"
            Grid.Column="0" Grid.Row="2" Width="110"
            Format="0:dd/MM/yy HH:mm" SelectedValue="{Binding ElementName=TimePicker, Path=DisplayTime, Mode=TwoWay}" />

        <TextBlock Grid.Column="1" Grid.Row="2" Text="{Binding ElementName=DateTimePicker3, Path=SelectedValue, Mode=OneWay, StringFormat=dd/MM/yy HH:mm}" Width="110" VerticalAlignment="Top"/>
        <TextBlock Grid.Column="2" Grid.Row="2" Text="{Binding ElementName=DateTimePicker3, Path=InterimValue, Mode=OneWay, StringFormat=dd/MM/yy HH:mm}" Width="110" VerticalAlignment="Top"/>





    </Grid>
</Window>

